import fetch from '@/api'
// 账页统计
export function getAccountPageCount(params) {
    return fetch({
        method: 'get',
        url: `/accountPage/count`,
        params,
    })
}

// 获取账页列表
export function getAccountPageList(params) {
    return fetch({
        method: 'get',
        url: `/accountPage`,
        params,
    })
}
// 获取货主账页
export function getCargoOwnerAccount(params) {  
    return fetch({
        method:'get',
        url:`/cargoOwnerAccount`,
        params,
    })
}
// 查询货名-分页
export function getCargoNameList(params) {
    return fetch({
        method:'get',
        url:`/cargoName`,
        params
    })
}
// 更具货名查询属性
export function getPiecesCargo(params) {
    return fetch({
        method:'get',
        url:`/piecesCargo/query`,
        params
    })
}
// 获取存单列表
export function getAccountBill(id,params) {  
    return fetch({
        method:'get',
        url:`/accountPage/bill/${id}`,
        params,
    })
}

//禁止回复上账接口
export function stopOrRecoveryPage(id,type) {  
    return fetch({
        method:'post',
        url:`/accountPage/stopOrRecovery/${id}/${type}`
    })
}
//调账列表
export function getAdjustList(params) {  
    return fetch({
        method:'get',
        url:`/adjust`,
        params,
    })
}
//调账新增
export function getAdjustAdd(type,data) {  
    return fetch({
        method:'get',
        url:`/adjust/add/${type}`,
        data
    })
}
//调账编辑
export function getAdjustEdit(id,type,data) {  
    return fetch({
        method:'put',
        url:`/adjust/update/${id}/${type}`,
        data
    })
}
//调账删除
export function getAdjustDelete(id) {  
    return fetch({
        method:'delete',
        url:`/adjust/${id}`
    })
}
//调账提交
export function getAdjustSubmit(id) {  
    return fetch({
        method:'post',
        url:`/adjust/submit/${id}`
    })
}
//调账退回
export function getAdjustReturn(id,data) {  
    return fetch({
        method:'post',
        url:`/adjust/doReturn/${id}`,
        data
    })
}
//调账审核
export function getAdjustCheck(id) {  
    return fetch({
        method:'post',
        url:`/adjust/doCheck/${id}`
    })
}
//副账页信息列表
export function findViceAccount(params) {  
    return fetch({
        method:'get',
        url:`/adjust/find/account`,
        params,
    })
}
//合并账页
export function postMergeAccount(id,data) {  
    return fetch({
        method:'post',
        url:`/accountPage/${id}/mergeAccount`, 
        data,
    })
}
//新增
export function addAccountPage(data) {  
    return fetch({
        method:'post',
        url:`/accountPage`,
        data,
    })
}

// 编辑
export function updateAccountPage(id,data) {
    return fetch({
        method:'put',
        url:`/accountPage/${id}`,
        data,
    })
}

// 删除
export function deleteAccountPage(id) {
    return fetch({
        method:'delete',
        url:`/accountPage/${id}`,
    })
}

// 库存调账列表
export function getAdjustAccountPage(id) {
    return fetch({
        method:'get',
        url:`/adjust`,
    })
}